package cn.myframe.utils.aop;

import cn.myframe.entity.sys.CheckData;

import java.util.HashMap;
import java.util.Map;

public class AssociateData {
    
    static Map<String,CheckData> associateData = new HashMap<String,CheckData>();
    public final static String USER_COMPANY                  = "1";
    public final static String MATERIAL_TEMPLATE             = "2";
    public final static String MATERIAL_RP_PORTAL            = "3";
    public final static String MATERIAL_SCHEDULE             = "4";
    public final static String ORDER_ADVTISTER               = "5";
    public final static String SMARAT_REGION                 = "6";
    public final static String COMPANY_REGION                = "7";
    public final static String GROUP_WX_USER                 = "8";
    public final static String GROUP_REGION                  = "9";
    public final static String GROUP_SM_CARD                 = "10";
    public final static String GROUP_CHANNEL                 = "11";
    public final static String ADVERTISER_COMPANY            = "12";

    public final static String MID_MATERIAL_TEMPLATE         = "13";
    public final static String MID_SCHEDULE_PORTAL           = "14";
    public final static String REDPACKET_SCHEDULE            = "15";
    public final static String TEMPLATE_SCHEDULE             = "16";
    public final static String STRATEGY_SCHEDULE             = "17";
    public final static String MID_ACTIVITY_SCHEDULE         = "18";
    
    public final static String ROLE_USER                     = "20";
    public final static String COMPANY_USER                  = "21";
    public final static String ORDER_REDPACKET               = "22";
    public final static String MATERIAL_WXCARDLOGO           = "23";
    public final static String MATERIAL_WXCARDABSTRACT       = "24";
    public final static String COLUMN_GROUP              	 = "25";
    public final static String NETWORK_GROUP              	 = "26";
    public final static String FCOLUMN_COLUMN              	 = "27";
    public final static String REPLY_REDPACKET               = "28";
    public final static String SCHEDULE_REDPACKET            = "29";
    public final static String GROUP_STRATEGY                = "30";
    public final static String MATERIAL_ZIP_TEMPLATE         = "31";
    public final static String NETWORK_COMPANY         		 = "32";
    public final static String EXCHANGE_PRODUCT         	 = "33";
    public final static String SCHEDULE_WXCARDMP         	 = "34";
    public final static String COMPANY_NETWORK         	 	 = "35";

    public final static String USER_REGION  = "user_region";
    static {
        /**操作员关联区域**/
        CheckData data = new CheckData("tb_user","user_id","region","name","status","操作员",
                "tb_region","region_id","region_name","status","区域","1");
        associateData.put(USER_REGION,data);
    }

    static {
        /**运营商被用户关联**/
        CheckData data1 = new CheckData("SYS_USER", "user_id", "COMPANY_NO", "username", "STATUS", "用户",
                "BUS_COMPANY", "COMPANY_NO", "COMPANY_NAME", "STATUS", "运营商", "1");
        associateData.put(USER_COMPANY, data1);
        
        /**素材被模板关联**/
        CheckData data2 = new CheckData("adv_template", "id", "background", "template_name", "status", "模板",
                "adv_material", "id", "material_name", "status", "素材", "1");
        associateData.put(MATERIAL_TEMPLATE, data2);
        
        /**素材被portal关联**/
        CheckData data3 = new CheckData("adv_rp_portal", "id", "pic_background", "portal_name", "status", "portal",
                "adv_material", "id", "material_name", "status", "素材", "1");
        associateData.put(MATERIAL_RP_PORTAL, data3);
        
        /**素材被投放关联**/
        CheckData data4 = new CheckData("adv_schedule", "id", "material_id", "schedule_name", "status", "投放",
                "adv_material", "id", "material_name", "status", "素材", "1");
        associateData.put(MATERIAL_SCHEDULE, data4);

        /**订单关联广告主**/
        CheckData data5 = new CheckData("bus_order","id","advertiser_id","order_name","status", "订单",
                "bus_advertiser","id", "ad_name","status","广告主","1");
        associateData.put(ORDER_ADVTISTER, data5);
        
        /**智能卡关联区域**/
        CheckData data6 = new CheckData("bus_sm_card","id","region_id","card_num","status", "智能卡",
                "bus_region","id", "region_name","status","区域","1");
        associateData.put(SMARAT_REGION, data6);
        
        /**运营商关联区域**/
        CheckData data7 = new CheckData("BUS_COMPANY","COMPANY_NO","REGION_ID","COMPANY_NAME","STATUS", "运营商",
                "bus_region","id", "region_name","status","区域","1");
        associateData.put(COMPANY_REGION, data7);
        
        /**分组关联微信用户**/
        CheckData data8 = new CheckData("bus_group", "id", "group_name", "status", "分组", 
                "bus_wx_user", "id", "wx_username", "status", "微信用户", 
                "bus_group_map", "group_id", "resource_id", "2","group_type", "1");
        associateData.put(GROUP_WX_USER, data8);
        
        /**分组关联区域**/
        CheckData data9 = new CheckData("bus_group", "id", "group_name", "status", "分组", 
                "bus_region", "id", "region_name", "status", "区域", 
                "bus_group_map", "group_id", "resource_id", "2","group_type", "2");
        associateData.put(GROUP_REGION, data9);
        
        /**分组关联卡号**/
        CheckData data10 = new CheckData("bus_group", "id", "group_name", "status", "分组", 
                "bus_sm_card", "id", "card_num", "status", "智能卡", 
                "bus_group_map", "group_id", "resource_id", "2","group_type", "3");
        associateData.put(GROUP_SM_CARD, data10);
        
        /**分组关联频道**/
        CheckData data11 = new CheckData("bus_group", "id", "group_name", "status", "分组", 
                "bus_channel", "id", "channel_name", "status", "频道", 
                "bus_group_map", "group_id", "resource_id", "2","group_type", "4");
        associateData.put(GROUP_CHANNEL, data11);

        /**运营商关联广告主**/
        CheckData data12 = new CheckData("bus_advertiser","id","company_name","ad_name","status", "广告主",
                "BUS_COMPANY","company_no", "company_name","status","运营商","1","company_name");
        associateData.put(ADVERTISER_COMPANY, data12);
        
        /*角色被用户关联*/
        CheckData data20 = new CheckData("SYS_USER", "USER_ID", "USER_NAME", "STATUS", "用户",
                "SYS_ROLE", "ROLE_ID", "ROLE_NAME", "STATUS", "角色",
                "SYS_USER_ROLE", "USER_ID","ROLE_ID","2");
        associateData.put(ROLE_USER, data20);

        /**运营商被用户关联**/
        CheckData data21 = new CheckData("SYS_USER", "USER_ID", "COMPANY_NO", "USER_NAME", "STATUS", "用户",
                "BUS_COMPANY", "COMPANY_NO", "COMPANY_NAME", "STATUS", "运营商", "1");
        associateData.put(COMPANY_USER, data21);

        /**订单被红包关联**/
        CheckData data22 = new CheckData("bus_redpacket", "id", "order_id", "packet_name", "status", "红包",
                "bus_order", "id", "order_name", "status", "订单", "1");
        associateData.put(ORDER_REDPACKET, data22);

        /**素材被卡券logo关联**/
        CheckData data23 = new CheckData("bus_wx_card_mp", "id", "brand_logo", "title", "status", "卡劵logo",
                "adv_material", "id", "material_name", "status", "素材", "1");
        associateData.put(MATERIAL_WXCARDLOGO, data23);

        /**素材被卡券封面关联**/
        CheckData data24 = new CheckData("bus_wx_card_mp", "id", "abstract_icon", "title", "status", "卡卷封面",
                "adv_material", "id", "material_name", "status", "素材", "1");
        associateData.put(MATERIAL_WXCARDABSTRACT, data24);

        /**素材被模板关联，中间表**/
        CheckData data13 = new CheckData("adv_template", "id", "template_name", "status", "模板",
                "adv_material", "id", "material_name", "status", "素材",
                "adv_template_material","template_id","material_id","2");
        associateData.put(MID_MATERIAL_TEMPLATE, data13);

        /**投放被portal关联，中间表**/
        CheckData data14 = new CheckData("adv_rp_portal", "id", "portal_name", "status", "portal",
                "adv_schedule", "id", "schedule_name", "status", "投放",
                "adv_portal_schedule","portal_id","schedule_id","2");
        associateData.put(MID_SCHEDULE_PORTAL, data14);

        /**红包被投放关联**/
        CheckData data15 = new CheckData("adv_schedule", "id", "redpacket_id", "schedule_name", "status", "投放",
                "bus_redpacket", "id", "packet_name", "status", "红包", "1");
        associateData.put(REDPACKET_SCHEDULE, data15);

        /**模板被投放关联**/
        CheckData data16 = new CheckData("adv_schedule", "id", "template_id", "schedule_name", "status", "投放",
                "adv_template", "id", "template_name", "status", "模板", "1");
        associateData.put(TEMPLATE_SCHEDULE, data16);

        /**策略被投放关联**/
        CheckData data17 = new CheckData("adv_schedule", "id", "strategy_id", "schedule_name", "status", "投放",
                "ADV_DISPATCH_STRATEGY", "ID", "STRATEGY_NAME", "AUDIT_STATUS", "策略", "1");
        associateData.put(STRATEGY_SCHEDULE, data17);

        /**活动被投放关联**/
        CheckData data18 = new CheckData("adv_schedule", "id", "activity_id", "schedule_name", "status", "投放",
                "bus_activity", "id", "activity_name", "status", "活动", "1");
        associateData.put(MID_ACTIVITY_SCHEDULE, data18);
        
        /**活动被投放关联，中间表**/
        /*CheckData data18 = new CheckData("adv_schedule", "id", "schedule_name", "status", "投放",
                "bus_activity", "id", "activity_name", "status", "活动",
                "schedule_activity","adv_schedule_id","activity_id","2");
        associateData.put(MID_ACTIVITY_SCHEDULE, data18);*/
        
        /**分组关联栏目**/
        CheckData data25 = new CheckData("bus_group", "id", "group_name", "status", "分组", 
                "BUS_COLUMN", "ID", "COLUMN_NAME", "STATUS", "栏目", 
                "bus_group_map", "group_id", "resource_id", "2","group_type", "5");
        associateData.put(COLUMN_GROUP, data25);
        
        /**分组关联网络ID**/
        CheckData data26 = new CheckData("bus_group", "id", "group_name", "status", "分组", 
                "BUS_NETWORK", "ID", "NETWORK_NAME", "STATUS", "网络", 
                "bus_group_map", "group_id", "resource_id", "2","group_type", "6");
        associateData.put(NETWORK_GROUP, data26);
        
        /**父栏目被子栏目关联**/
        CheckData data27 = new CheckData("BUS_COLUMN","ID","PARENT_COLUMN_CODE","COLUMN_NAME","STATUS","子栏目",
                "BUS_COLUMN","id", "COLUMN_NAME","STATUS","父栏目","1");
        data27.setAssCode("COLUMN_CODE");
        associateData.put(FCOLUMN_COLUMN, data27);
        
        /**回复语被红包关联**/
        CheckData data28 = new CheckData("bus_redpacket", "id", "reply_id", "packet_name", "status", "红包",
                "bus_reply", "id", "reply_name", "status", "回复语", "1");
        associateData.put(REPLY_REDPACKET, data28);

        
        /**分组被策略关联**/
        CheckData data29 = new CheckData("ADV_DISPATCH_STRATEGY", "ID", "STRATEGY_NAME", "AUDIT_STATUS", "策略", 
                "bus_group", "id", "group_name", "status", "分组", 
                "ADV_STRATEGY_RESOURCE_MAP", "STRATEGY_ID","RESOURCE_ID","2","TYPE","23");
        associateData.put(GROUP_STRATEGY, data29);
    
        /**素材被模板关联**/
        CheckData data31 = new CheckData("adv_template", "id", "template_material", "template_name", "status", "模板",
                "adv_material", "id", "material_name", "status", "素材", "1");
        associateData.put(MATERIAL_ZIP_TEMPLATE, data31);
        
        /**运营商被网络关联**/
        CheckData data32 = new CheckData("BUS_NETWORK", "ID", "COMPANY_NO", "NETWORK_NAME", "STATUS", "网络ID",
                "BUS_COMPANY", "COMPANY_NO", "COMPANY_NAME", "STATUS", "运营商", "1");
        associateData.put(NETWORK_COMPANY, data32);
        
        /**产品包被兑换活动关联**/
        CheckData data33 = new CheckData("bus_point_exchange", "id", "product_id", "exchange_name", "status", "兑换活动",
                "bus_product", "id", "product_name", "status", "产品包", "1");
        associateData.put(EXCHANGE_PRODUCT, data33);
        
        /**优惠卷被投放关联**/
        CheckData data34 = new CheckData("adv_schedule", "id", "card_mp_id", "schedule_name", "status", "投放",
                "bus_wx_card_mp", "id", "title", "status", "优惠卷", "1");
        associateData.put(SCHEDULE_WXCARDMP, data34);
        
        /**运营商被网络关联**/
        CheckData data35 = new CheckData("BUS_NETWORK", "ID", "COMPANY_NO", "NETWORK_NAME", "STATUS", "网络ID",
                "BUS_COMPANY", "COMPANY_NO", "COMPANY_NAME", "STATUS", "运营商", "1");
        associateData.put(COMPANY_NETWORK, data35);


    }
}

